<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <title>锋行天下</title>
  <link rel="shortcut icon" href="./images/sx.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
  <style>
    html,
    body {
      padding-bottom: 3vh;
      position: relative;
      height: 100%;
      margin: 0;
    }

    body {
      background: #eee;
      font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
      font-size: 14px;
      color: #000;
      margin: 0;
      padding: 0;
    }

    #content{
      box-sizing: border-box;
      padding: 0 2vw;
      width: 100%;
      overflow: hidden;
    }
    video{
      width: 96vw;
    }
    .back{
      width: 100%;
      height: 6vh;
      display: flex;
      justify-content: space-around;
      align-items: center;
    }
    .back .txt{
      width: 50%;
      height: 100%;
      line-height: 6vh;
      text-align: center;
      border-radius: 2vh;
      background: #cccccc;
    }
  </style>
  <script src="./js/axios.js"></script>
  
</head>

<body>
  <div id="content"></div>
  <div class="back">
    <div class="txt">回首页</div>
  </div>
  <script src="./js/swiper-bundle.min.js"></script>

  <!-- Initialize Swiper -->
  <script>
    window.onload = () => {
      let locationData = window.location.search.split('?')[1]
      let id = locationData.split("=")[1]
      let content=document.getElementById("content")
      axios.get("/shopApi/haibao/getById?id="+id).then(res => {
        if (res.status == 200) {
          console.log('detai',res)
          document.title=res.data.data.title
          content.innerHTML=res.data.data.content
        }
      })
      document.querySelector('.txt').onclick=()=>{
        window.location.href='/'
      }
      //提交游客记录
      let str=navigator.userAgent.toLocaleLowerCase()
      let strArr=str.split(" ")
      let last1=strArr[strArr.length-1]
      let last2=strArr[strArr.length-2]
      let ua=`${last2}-${last1}`
      axios.get(`/shopApi/addTourist?scene=xinwen|detail&message=${ua}`).then(res => {
        if(res.status==200){
          console.log("ok")
        }
      })
    }
  </script>
</body>

</html>